import requests
from bs4 import BeautifulSoup
url = "https://www.dianping.com/dongyang/ch10"
header = {
    "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"}
re = requests.get(url, headers=header)
soup = BeautifulSoup(re.text, "html.parser")
res = soup.find_all(class_="txt")
for i in res:
    print(i.h4.string)
number = soup.find_all(class_="star_score score_40 star_score_sml")
for j in number:
    print(j.contents[0])